#ifndef SERVERSELECTION_H
#define SERVERSELECTION_H

#include <QMainWindow>
#include <QMouseEvent>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QTextCodec>
#include <QMessageBox>
#include <QDesktopServices>
#include <QFileInfo>
#include<Qprocess>
#include <QDir>

namespace Ui {
class ServerSelection;
}

class ServerSelection : public QMainWindow
{
    Q_OBJECT

public:
    explicit ServerSelection(QWidget *parent = 0);
    ~ServerSelection();
    QString getHtml(QString url);
    void WriteConfig();
    QString CheckFileMD5(QString path);
    bool CheckSysMD5();
    void VerInit();
    bool fileCheck(QFile *file);

private slots:
    void UpdataUI();
    void DownLoadData();

protected:
    void mousePressEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);

private slots:
    void on_pushButton_2_clicked();

    void on_radioGF_clicked();

    void on_radioBLBL_clicked();

    void on_pushButton_clicked();

    void on_MJCKlabel_clicked();

    void on_about_clicked();

    void on_retry_clicked();

    void on_label_ver_clicked();

    void on_spikeLaunch_stateChanged(int arg1);

private:
    Ui::ServerSelection *ui;
    bool m_move;
    QPoint m_startPoint;
    QPoint m_windowPoint;
    QString type;
    QString cps;
    QString channel;
    QString sub_channel;
    QString game_install_path;
    QString is_user_update;
    QString new_version;
    QString game_dynamic_bg_name;
    QString is_first_exit;
    QString exit_type;
    QString is_auto_update;
    QString game_dynamic_bg_md5;
    QString game_version;
};

#endif // SERVERSELECTION_H
